import request from '@/utils/request'

// 查询返利订单列表
export function listOrder(query) {
  return request({
    url: '/jd/rebate/order/list',
    method: 'get',
    params: query
  })
}
// 查询返利订单列表
export function pageList(query) {
  return request({
    url: '/jd/rebate/order/pageList',
    method: 'get',
    params: query
  })
}

// 查询返利订单详细
export function getRebateOrder(id) {
  return request({
    url: '/jd/rebate/order/' + id,
    method: 'get'
  })
}

// 新增返利订单
export function addOrder(data) {
  return request({
    url: '/jd/rebate/order',
    method: 'post',
    data: data
  })
}

// 修改返利订单
export function updateOrder(data) {
  return request({
    url: '/jd/rebate/order',
    method: 'put',
    data: data
  })
}

// 删除返利订单
export function delOrder(id) {
  return request({
    url: '/jd/rebate/order/' + id,
    method: 'delete'
  })
}


// 导入id列表
export function importJinFenData(data) {
  return request({
    url: '/jd/rebate/order/importIdAndOrderExcel',
    method: 'post',
    data: data
  })
}

// 导入京粉csv
export function importJinFenCsv(data) {
  return request({
    url: '/jd/rebate/order/importJinFenCsv',
    method: 'post',
    data: data
  })
}
// 页面统计图
export function queryRebatePie(query) {
  return request({
    url: '/jd/rebate/order/queryRebatePie',
    method: 'get',
    params: query
  })
}
//折现图统计数据
export function rebateChart(query) {
  return request({
    url: '/jd/rebate/order/rebateChart',
    method: 'get',
    params: query
  })
}
//统计数据
export function rebateStatistics(query) {
  return request({
    url: '/jd/rebate/order/rebateStatistics',
    method: 'get',
    params: query
  })
}



// 查询返利活动列表
export function listActivity(query) {
  return request({
    url: '/jd/activity/list',
    method: 'get',
    params: query
  })
}

// 查询返利活动详细
export function getActivity(id) {
  return request({
    url: '/jd/activity/' + id,
    method: 'get'
  })
}

// 新增返利活动
export function addActivity(data) {
  return request({
    url: '/jd/activity',
    method: 'post',
    data: data
  })
}

// 修改返利活动
export function updateActivity(data) {
  return request({
    url: '/jd/activity',
    method: 'put',
    data: data
  })
}

// 删除返利活动
export function delActivity(id) {
  return request({
    url: '/jd/activity/' + id,
    method: 'delete'
  })
}
